package model;

import java.io.*;
import java.text.*;
import java.sql.*;
import java.util.*;

import database.DBConnection;
import database.dao.UserDAO;
import log.MyLogger;

/**
 * 
 * @author Matu
 * 
 */

public class UserAuth {
	User authUser;
	UserDAO userDAO = new UserDAO();

	public User auth(String username, String passw) {

		try {
			
			

			
			//DAO, Hibernate class is used now
			authUser = userDAO.getUserFromDB(username, passw);

		} catch (Exception ex) {
			ex.printStackTrace();

				MyLogger.Log("Auth.UserAuthSQL():",ex.getMessage());
		}
		
		return authUser;

	}
}